PXC Documentation

PXC Home

Palette Extract

pre 1.18

Extract palette from an image.



Node Data

ColorArray

Display name

Palette Extract

Internal name

Node_Palette_Extract

Inheritances

node
node_processor
node_palette_extract

Inputs

node_palette_extract

surface

Surface In

int

Max Colors

int

Seed

enum

Algorithm

enum

Color Space

Outputs

node_palette_extract

color

Palette

Palette extract read the image and generate palette from it. Note that this node can cause performance issue if the image is too large.



Algorithms


The first step is to extract all colors from the images, then we can use different algorithms to reduce the number of colors. The available algorithms are:


K-mean


K-mean is a simple algorithm that can be used to cluster data. When select this algorithm you can choose what color space to use, and how many colors to extract.


Property Description
Color Space Color space to use for the algorithm
Max colors Number of initial cluster centrals. Note that due to the nature of the algorithm, the resulting palette may not have the exact number of colors as specified.

Frequency


Frequency algorithm simply count the frequency of each color and return the most frequent colors based on the Max Colors value.


All colors


Return all colors found in the image.